{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c6e1f330-1b92-4d7a-9e68-2eadb205b542",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import dgl\n",
    "import torch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "862bff33-124c-474b-8a9f-957bf3bb8d91",
   "metadata": {},
   "outputs": [],
   "source": [
    "twitter = pd.read_csv('../data/out.munmun_twitter_social',skiprows=2, delimiter=' ', header=None)\n",
    "twitter_graph = dgl.graph((twitter[0], twitter[1]))\n",
    "dgl.save_graphs('./edge_data/twitter/whole.graph',twitter_graph)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "2bdca1c6-24d1-4b07-8e59-31a49a00037b",
   "metadata": {},
   "outputs": [],
   "source": [
    "cora = pd.read_csv('../data/out.subelj_cora_cora',skiprows=2, delimiter=' ', header=None)\n",
    "cora_graph = dgl.graph((cora[0], cora[1]))\n",
    "dgl.save_graphs('./edge_data/cora/whole.graph',cora_graph)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "97fb75a3-5af1-443c-a45e-fbb2a65e20f0",
   "metadata": {},
   "outputs": [],
   "source": [
    "epinions = pd.read_csv('./data/soc-Epinions1.txt',skiprows=4, delimiter='\\t', header=None)\n",
    "epinions_graph = dgl.graph((epinions[0], epinions[1]))\n",
    "dgl.save_graphs('./edge_data/epinions/whole.graph',epinions_graph)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "test",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
